<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="header">
	<div class="content-wrapper">
		<div class="avatar">
			<img width="64" height="64" src="img/seller_avatar_5F256px.jpg">
		</div>
		<div class="content">
			<div class="title">
				<span class="brand"></span>
				<span class="name">菜系:${name}</span>
			</div>
			<div class="description">
				蜂鸟专送/38分钟送达
			</div>
			<div class="support">
				<span class="icon decrease"></span>
				<span class="text">在线支付满28减5</span>
			</div>
		</div>
	</div>
	<div class="bulletin-wrapper">
		<span class="bulletin-title"></span><span class="bulletin-text">粤菜即广东菜，是中国传统四大菜系、八大菜系之一，发源于岭南。粤菜由广州菜（也称广府菜）、潮州菜（也称潮汕菜）、东江菜（也称客家菜）三种地方风味组成，三种风味各具特色。</span>
		<i class="icon-keyboard_arrow_right"></i>
	</div>
	<div class="background">
		<img width="100%" height="100%" src="img/seller_avatar_5F256px.jpg">
	</div>
	<div class="detail fade-transition" style="display: none;">
		<div class="detail-wrapper clearfix">
			<div class="detail-main">
				<h1 class="name">菜系</h1><h2>${user_id}</h2>
				<div class="star-wrapper">
					<div class="star star-48">
						<span class="star-item on"></span><span class="star-item on"></span><span class="star-item on"></span><span class="star-item on"></span><span class="star-item off"></span>
					</div>
				</div>
				<div class="title">
					<div class="line"></div>
					<div class="text">优惠信息</div>
					<div class="line"></div>
				</div>
				<ul class="supports">
					<li class="support-item">
						<span class="icon decrease"></span>
						<span class="text">在线支付满28减5</span>
					</li><li class="support-item">
					<span class="icon discount"></span>
					<span class="text">VC无限橙果汁全场8折</span>
				</li><li class="support-item">
					<span class="icon special"></span>
					<span class="text">单人精彩套餐</span>
				</li><li class="support-item">
					<span class="icon invoice"></span>
					<span class="text">该商家支持发票,请下单写好发票抬头</span>
				</li><li class="support-item">
					<span class="icon guarantee"></span>
					<span class="text">已加入“外卖保”计划,食品安全保障</span>
				</li>
				</ul>
				<div class="title">
					<div class="line"></div>
					<div class="text">商家公告</div>
					<div class="line"></div>
				</div>
				<div class="bulletin">
					<p class="content">粥品香坊其烹饪粥料的秘方源于中国千年古法，在融和现代制作工艺，由世界烹饪大师屈浩先生领衔研发。坚守纯天然、0添加的良心品质深得消费者青睐，发展至今成为粥类的引领品牌。是2008年奥运会和2013年园博会指定餐饮服务商。</p>
				</div>
			</div>
		</div>
		<div class="detail-close">
			<i class="icon-close"></i>
		</div>
	</div>
</div>
<div class="main">
	<div class="left-menu"  id="left">
		<ul>
			<li><span>推荐套餐</span></li>
			<li><span>实惠炒菜</span></li>
			<li><span>全部</span></li>
			<li><span><a href="ReturnToHomePage">返回主页</a></span></li>
		</ul>
	</div>
	<div class="con">
	<!-- 推荐套餐 -->
		<div class="right-con con-active" style="display: none;">
			<ul>
			  <c:forEach items="${lsss}" var="p" >
			  
				<li>
				<input type="hidden" value="${p.product_id }">
					<div class="menu-img"><img src="uploads/${p.product_icon}" width="55" height="55"></div>
					<div class="menu-txt">
						<h4 data-icon="00">${p.product_name }</h4>
						<p class="list1">${p.product_category }</p>
						<p class="list2">
							<b>￥</b><b>${p.product_price}元/份</b>
						</p><div class="btn">
						<button class="minus">
							<strong></strong>
						</button>
						<i>0</i>
						  <input type="button" value="加入购物车" onclick="addCart(${p.product_id })">
						
					<i class="price">28</i>
					</div>
					</div>
					 </li>
				
			  </c:forEach>
			 
			</ul>
		</div>
	

	</div>
	<!-- 购物车 -->
	<div class="up1"></div>
	<form action="showCart" method="post">
	<div class="footer">   
		<div class="right">  
			<input class="xhlbtn  disable" type="submit" id="clk_btn" value="去结算"/>  
		</div>   
	</div>
	</form>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/add.js"></script>
<script type="text/javascript" src="js/vue.min.js"></script>
<script>
	function addCart(id){
		
		var p_id = id;
		 $.ajax({ 
		     type : "POST", //提交方式 
		     url : "addCart",//路径 
		     data : { product_id : p_id	},//数据，这里使用的是Json格式进行传输 
		     async: true,   //是否为异步请求
	         cache: false,  //是否缓存结果
	         type: "POST", //请求方式为POST
	         dataType: "text",   //服务器返回的数据是什么类型 
		     success: function(data){
		    	 if(data == "success"){
		    		 alert("加入购物车成功");
		    	 }
		     }
		    }); 
	}
</script>
</body>
</html>
